package com.itnoob.controller;

import cn.hutool.extra.spring.SpringUtil;
import com.itnoob.service.proxy.PayProxy;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;

/**
 * @author zhoujun
 * @date 2025/3/18 22:47
 */
@RestController
public class PayController {

    /**
     * type: ALI,WECHAT
     * @param type
     */
    @RequestMapping("/pay")
    public void pay(@RequestParam("type") String type){

        PayProxy payProxy = new PayProxy(SpringUtil.getBean(type));
        payProxy.pay(new BigDecimal(1000));
    }

}
